Xcode Treasures by Chris Adamson
Author:Chris Adamson
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
Publisher: Pragmatic Bookshelf
Breakpoint Actions
The bottom two items in the breakpoint editor pop-over are the Action and Options sections. There’s only one option: automatically continuing after hitting the breakpoint. That seems pointless, right? Why hit a breakpoint only to then continue?
The reason to continue is that the “Add Action” button lets you add actions, and it’s often enough to perform that action and continue, without stopping to investigate anything.
The simplest thing you can add is a logging action. Once you click, “Add Action”, the UI expands to offer a pop-up menu of action types, and various buttons and text fields to customize the action. The simplest to understand is the Log Message action. It can log a string to the console or send it to the Mac’s speech synthesizer to be spoken aloud. It also allows you to use @expression@ syntax to evaluate expressions in the currently active language and insert them into the log string.
The following figure shows a breakpoint on the isPrime = false line, logging a reason for ruling out candidate as a prime number, with the log string @candidate@ is not prime (divisible by @divisor@):
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(23572)
Hello! Python by Anthony Briggs(22707)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(21526)
Kotlin in Action by Dmitry Jemerov(20570)
Dependency Injection in .NET by Mark Seemann(20491)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(20388)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(19537)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(18334)
Grails in Action by Glen Smith Peter Ledbrook(17458)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(16976)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(14871)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(12834)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(11242)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10603)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(10487)
Hit Refresh by Satya Nadella(9138)
The Kubernetes Operator Framework Book by Michael Dame(8544)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8372)
Robo-Advisor with Python by Aki Ranin(8317)